<style>
    .marginAdjust{
        margin-top:inherit;
        margin-left:100px;
    }
</style>

<div class="col-md-4">
    <div class="ribbon">
        <a href=""><span class="home fa fa-home"></span></a>
        <ol class="breadcrumb">
            <li>商品类型列表</li>
        </ol>
    </div>

    <div class="table-wrapper table-bordered" style="height: 500px">
        <div class="toolbar">
            <form role="form">
                <div class="inline-group">
                    <button type="button" class="btn btn-sm btn-success pull-right" ng-click="initPopUpGoodsType()"><i class="fa fa-plus"></i> 新增商品类型 </button>
                </div>
            </form>
        </div>

        <table class="table table-striped table-hover props table-sm">
            <thead>
            <tr>
                <th width="1%"></th>
                <td width="9%">序号</td>
                <td width="20%">类型编码</td>
                <td width="20%">类型名称</td>
                <td width="30%">说 明</td>
                <td width="20%">操 作</td>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="goodsType in vm.goodsTypesList">
                <td></td>
                <td class="message">{{$index+1+pagerGoodsTypes.pageSize*(pagerGoodsTypes.getCurPageNo()-1)}}</td>
                <td class="message">{{goodsType.code}}</td>
                <td class="message">{{goodsType.name}}</td>
                <td class="message">{{goodsType.note}}</td>
                <td class="operate">
                    <button title="修改" ng-click="modifyGoodsType(goodsType)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="fa fa-edit"></i>
                    </button>
                    <button title="删除" ng-click="deleteGoodsType(goodsType)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="fa fa-trash-o"></i>
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
        <div ng-if="vm.goodsTypesList.length == 0" nj-table-no-data></div>
        <div nj-pager pager="pagerGoodsTypes"></div>


    </div>
</div>

<div class="col-md-8">
    <div class="ribbon">
        <a href=""><span class="home fa fa-home"></span></a>
        <ol class="breadcrumb">
            <li>商品信息列表</li>
        </ol>
    </div>

    <div class="table-wrapper table-bordered" style="height: 500px">
        <div class="toolbar">
            <form role="form">
                <div class="inline-group">
                    <label class="input"><input type="text" class="form-control input-sm" placeholder="输入商品名称" ng-model="q.goodsName" ng-change="search()"> </label>
                    <button type="submit" class="btn btn-sm btn-primary" ng-click="search()"><i class="fa fa-user"></i>搜索商品名称</button>
                    <button type="button" class="btn btn-sm btn-success pull-right" ng-click="initPopUpGoods()"><i class="fa fa-plus"></i> 新增商品 </button>
                </div>
            </form>
        </div>

        <table class="table table-striped table-hover props table-sm">
            <thead>
            <tr>
                <th width="1%"></th>
                <td width="4%">序号</td>
                <td width="9%">商品号</td>
                <td width="9%">商品名称</td>
                <td width="7%">商品类型</td>
                <!--<td width="7%">商品规格</td>-->
                <td width="5%">单位</td>
                <td width="5%">充装量</td>
                <td width="8%">钢瓶规格</td>
                <!--<td width="7%">价格(元)</td>-->
                <!--<td width="8%">有效期(天)</td>-->
                <td width="8%">状态</td>
                <td width="12%">所属区域</td>
                <td width="5%">说明</td>
                <td width="7%">操 作</td>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="good in vm.goodsList">
                <td></td>
                <td class="message">{{$index+1+pagerGoods.pageSize*(pagerGoods.getCurPageNo()-1)}}</td>
                <td class="message">{{good.code}}</td>
                <td class="message">{{good.name}}</td>
                <td class="message">{{good.goodsType.name}}</td>
                <!--<td class="message">{{good.specifications}}</td>-->
                <td class="message">{{good.unit}}</td>
                <td class="message">{{good.weight}}</td>
                <td class="message">{{good.gasCylinderSpec.name}}</td>
                <!--<td class="message">{{good.price}}</td>-->
                <!--<td class="message">{{good.lifeExpectancy}}</td>-->
                <td class="message">{{config.goodsStatusList[good.status].name}}</td>
                <td class="message">{{good.area.province}}{{good.area.city}}{{good.area.county}}</td>
                <td class="message">{{good.note}}</td>
                <td class="operate">
                    <button title="修改" ng-click="modifyGoods(good)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="fa fa-edit"></i>
                    </button>
                    <button title="删除" ng-click="deleteGoods(good)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="fa fa-trash-o"></i>
                    </button>
                </td>
            </tr>

            </tbody>
        </table>
        <div ng-if="vm.goodsList.length == 0" nj-table-no-data></div>
        <div nj-pager pager="pagerGoods"></div>


    </div>
</div>

<div class="col-md-6" style="margin-top: 10px">
    <div class="ribbon">
        <a href=""><span class="home fa fa-home"></span></a>
        <ol class="breadcrumb">
            <li>调价策略列表</li>
        </ol>
    </div>

    <div class="table-wrapper table-bordered" style="height: 400px">



        <div class="toolbar">
            <form role="form">
                <div class="inline-group">
                    <label class="input"><input type="text" class="form-control input-sm" placeholder="输入调价名称" ng-model="q.adjustName" ng-change="searchGoodsPriceAdjustment()"> </label>
                    <label class="input">时间：</label>
                    <label class="input"><input type="text"  id="datetimepickerStart"  class="form-control" ng-model="q.adjustStartTime"></label>
                    <label class="input">—</label>
                    <label class="input"><input type="text"  id="datetimepickerEnd"  class="form-control" ng-model="q.adjustEndTime"></label>
                    <button type="submit" class="btn btn-sm btn-primary" ng-click="searchGoodsPriceAdjustment()"><i class="fa fa-search"></i>搜索</button>

                    <button type="button" class="btn btn-sm btn-success pull-right" ng-click="initPopUpGoodsPriceAdjustment()"><i class="fa fa-plus"></i> 新增调价策略 </button>
                </div>
            </form>
        </div>

        <table class="table table-striped table-hover props table-sm">
            <thead>
            <tr>
                <th width="1%"></th>
                <td width="5%">序号</td>
                <td width="10%">计划名称</td>
                <td width="20%">生效时间</td>
                <td width="20%">创建时间</td>
                <td width="10%">状态</td>
                <td width="10%">操 作</td>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="goodsPriceAdjustment in vm.goodsPriceAdjustmentList">
                <td></td>
                <td class="message">{{$index+1+pagerGoodsPriceAdjustment.pageSize*(pagerGoodsPriceAdjustment.getCurPageNo()-1)}}</td>
                <td class="message">{{goodsPriceAdjustment.name}}</td>
                <td class="message">{{goodsPriceAdjustment.effectTime}}</td>
                <td class="message">{{goodsPriceAdjustment.createTime}}</td>
                <td class="message">{{goodsPriceAdjustment.status.name}}</td>
                <td class="operate">
                    <button title= "修改" ng-hide ="goodsPriceAdjustment.status.index == 1 ? true : false"
                            ng-click="modifyGoodsPriceAdjustment(goodsPriceAdjustment)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="fa fa-edit"></i>
                    </button>
                    <button title= "查看" ng-hide ="goodsPriceAdjustment.status.index == 1 ? false : true"
                            ng-click="modifyGoodsPriceAdjustment(goodsPriceAdjustment)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="fa fa-edit"></i>
                    </button>
                    <button title="删除" ng-hide ="goodsPriceAdjustment.status.index == 1 ? true : false"
                            ng-click="deleteGoodsPriceAdjustment(goodsPriceAdjustment)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="fa fa-trash-o"></i>
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
        <div ng-if="vm.goodsPriceAdjustmentList.length == 0" nj-table-no-data></div>
        <div nj-pager pager="pagerGoodsPriceAdjustment"></div>
    </div>
</div>

<div class="col-md-6" style="margin-top: 10px">
    <div class="ribbon">
        <a href=""><span class="home fa fa-home"></span></a>
        <ol class="breadcrumb">
            <li>优惠策略列表</li>
        </ol>
    </div>

    <div class="table-wrapper table-bordered" style="height: 400px">
        <div class="toolbar">
            <form role="form">
                <div class="inline-group">
                    <label class="input"><input type="text" class="form-control input-sm" placeholder="输入优惠名称" ng-model="q.couponName" ng-change="searchCouponAdjustment()"> </label>
                    <label class="input">时间：</label>
                    <label class="input"><input type="text"  id="couponPickerStart"  class="form-control" ng-model="q.couponStartTime" ></label>
                    <label class="input">-</label>
                    <label class="input"><input type="text"  id="couponPickerEnd"  class="form-control" ng-model="q.couponEndTime" ></label>
                    <button type="submit" class="btn btn-sm btn-primary" ng-click="searchCouponAdjustment()"><i class="fa fa-search"></i>搜索</button>
                    <button type="button" class="btn btn-sm btn-success pull-right" ng-click="initPopUpCouponAdjustment()"><i class="fa fa-plus"></i> 新增优惠策略 </button>
                    <p></p>

                    <label class="input">优惠类型：</label>
                    <label class="input "><select  ng-model="q.discountType" ng-options="discountType for discountType in vm.discountTypes" class="form-control" ng-selected="" ng-change="searchCouponAdjustment()"></select></label>
                    <label class="input">使用方式：</label>
                    <label class="input"><select  ng-model="q.useType" ng-options="useType for useType in vm.useTypes" class="form-control" ng-selected="" ng-change="searchCouponAdjustment()"></select></label>
                    <label class="input">状态：</label>
                    <label class="input"><select ng-model="q.status" ng-options="status for status in vm.status" class="form-control" ng-selected="" ng-change="searchCouponAdjustment()"></select></label>

                </div>
            </form>
        </div>

        <table class="table table-striped table-hover props table-sm">
            <thead>
            <tr>
                <th width="1%"></th>
                <td width="5%">序号</td>
                <td width="10%">优惠名称</td>
                <td width="10%">开始时间</td>
                <td width="10%">结束时间</td>
                <td width="10%">优惠类型</td>
                <td width="10%">条件类型</td>
                <td width="10%">使用方式</td>
                <td width="10%">状态</td>
                <td width="10%">操 作</td>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="couponAdjustment in vm.couponAdjustmentList">
                <td></td>
                <td class="message">{{$index+1+pagerCouponAdjustment.pageSize*(pagerCouponAdjustment.getCurPageNo()-1)}}</td>
                <td class="message">{{couponAdjustment.name}}</td>
                <td class="message">{{couponAdjustment.startTime}}</td>
                <td class="message">{{couponAdjustment.endTime}}</td>
                <td class="message">{{couponAdjustment.discountType.name}}</td>
                <td class="message">{{couponAdjustment.discountConditionType.name}}</td>
                <td class="message">{{couponAdjustment.useType.name}}</td>
                <td class="message">{{couponAdjustment.discountStrategyStatus.name}}</td>
                <td class="operate">
                    <button title="修改" ng-hide="couponAdjustment.discountStrategyStatus.index == 1 ? true : false"
                            ng-click="modifyCouponAdjustment(couponAdjustment)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="">修改</i>
                    </button>
                    <button title="查看" ng-hide="couponAdjustment.discountStrategyStatus.index == 1 ? false : true"
                            ng-click="modifyCouponAdjustment(couponAdjustment)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="">查看</i>
                    </button>
                    <button title="删除" ng-hide="couponAdjustment.discountStrategyStatus.index == 1 ? true : false"
                            ng-click="deleteCouponAdjustment(couponAdjustment)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="">删除</i>
                    </button>
                    <button title="作废" ng-click="cancelDiscountStrategies(couponAdjustment)" type="button" class="btn btn-primary btn-outline btn-xs">
                        <i class="">作废</i>
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
        <div ng-if="vm.couponAdjustmentList.length == 0" nj-table-no-data></div>
        <div nj-pager pager="pagerCouponAdjustment"></div>

    </div>
</div>


